<template>
  <div id="order">
    <van-tabs v-model="active">
      <van-tab
        v-for="(item, index) in list"
        :key="index"
        :name="item.id"
        :title="item.classifyName"
        swipeable
      >
        <!-- <iframe :src="jumpUrl" frameborder="0" class="iframeClass"></iframe> -->
        <iframe :src="item.jumpUrl + `&orderStatus=${getWhatPage}&tsToken=${token}`" frameborder="0" class="iframeClass"></iframe>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import req from "@/utils/index";
export default {
  data() {
    return {
      active: 1,
      list: [],
      getWhatPage: "",
      token: '',
      jumpUrl: ''
    };
  },
  created() {
    if (this.$route.params.id == 0) {
      this.getWhatPage = 'all'
    }
    if (this.$route.params.id == 1) {
      this.getWhatPage = 'notPay'
    }
    if (this.$route.params.id == 2) {
      this.getWhatPage = 'processing'
    }
    if (this.$route.params.id == 3) {
      this.getWhatPage = 'complete'
    }
    if (this.$route.params.id == 4) {
      this.getWhatPage = 'cacle'
    }
    
    
    this.token = window.localStorage.getItem('logintoken')
    req('get','/qyHome/getOtherClassify',{}).then(res=> {
      // console.log(res)
      if (res.rspCode == '000000') {
        this.list = res.data.list
        this.changeClick(this.list[0].id)
      }
    })
  },
  methods: {
  }
};
</script>

<style lang="scss" scoped>
.iframeClass {
  width: 100%;
  height: 16.5rem;
}
</style>